﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq;
using System.Data.Linq.Mapping;
namespace DTO
{
      [Table(Name = "dishes_type")]
   public class Dishes_Type
    {
        private int _nID;
        private string _strNameDishType;
        public Dishes_Type()
        { }

        [Column(IsPrimaryKey = true, IsDbGenerated = true,Name="ID")]
        public int NID
        {
            get { return _nID; }
            set { _nID = value; }
        }

          [Column(Name = "name_dishes_type")]
          public string StrNameDishType
          {
              get { return _strNameDishType; }
              set { _strNameDishType = value; }
          }
          private EntityRef<Dishes> _dishes;//One To One
          [Association(Storage = "_dishes",
          ThisKey = "ID", OtherKey = "ID")]
          public Dishes Dishes
          {
              get { return _dishes.Entity; }
              set { _dishes.Entity = value; }
          }
    }
}
